
// 时间格式转时间字符串
export function getMaptalkBoundaryValueByPointCloudPoint(dismensions, center) {
  if (!dismensions || !center) {
    console.log("缺少必要参数")
    return {};
  }
  if (dismensions.x == null || dismensions.y == null || center.x == null || center.y == null) {
    console.log("缺少必要参数")
    return {};
  }

  let halfX = dismensions.x / 2.0;
  let halfY = dismensions.y / 2.0;

  let ymax = center.y + halfY;
  let ymin = center.y - halfY;

  let xmax = center.x + halfX;
  let xmin = center.x - halfX;

  let len = 1000000;
  return { xmax: Math.round(xmax * len) / len, xmin: Math.round(xmin * len) / len, ymax: Math.round(ymax * len) / len, ymin: Math.round(ymin * len) / len };
}